using CustomORM.Examples.Entities;
using CustomORM.Mapping;

namespace CustomORM.Examples.MappingRepository
{
    class CustomerMap : EntityToTableMapper<Customer>
    {
        public CustomerMap()
        {
            Table("Customers");
            Id(x => x.CustomerID, "Customer ID")
                .UseAssignedValue();
            Map(x => x.CompanyName, "Company Name");
            Map(x => x.ContactName, "Contact Name");
            Map(x => x.ContactTitle, "Contact Title");
            Map(x => x.City, "City");
            HasMany(x => x.Orders, "Customer ID");
        }
    }
}